/**
 * @Author: zhoujie
 * @Date: 2019/9/94
 * @Last Modified by: 杨光宇
 * @Last Modified time: 2021-01-25 17:30:33
 */

import axios from '@/api/fetch';
import SERVER from '@/api/server';
import dictCode from '@/utils/dictCode';

const testDict = new Promise(resolve => {
  resolve([
    {
      value: '',
      text: '请选择'
    },
    {
      value: '0',
      text: '测试0'
    },
    {
      value: '1',
      text: '测试1'
    }
  ]);
});

// 维修类型 - 下拉框
export const getWxlxSelect = () => {
  // return testDict;
  return axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/findAllRepairType`);
};
// 车型
export const getCheXingSelect = params => {
  return testDict;
  // return axios.get(`/dms.web/manage/rest/basedata/selectModel?dmsFuncId=30151000`, { params });
};
// 领料人
export const getLingLiaoRenSelect = params => {
  // return testDict;
  return axios.get(`${SERVER.SYSMANAGE}/basedata/roles/getUserInfoByRolePosition?role='10071037,10071038,10071039'`, { params });
};

// 仓库
export const getCangKuSelect = params => {
  // return testDict;
  return axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partStocks/findUserControlStorageCode`, { params });
};
export const getStorageList = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partStocks/findUserControlStorageCode`, { params });

// 维修项目
// export const getWeiXiuXiangMuSelect = ({ ro }) => {
//   return testDict;
//   return axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/ttRepairOrder/roLabours/dictId/${ro}`);
// };
// 收费区分
export const getShouFeiQuFenSelect = () => {
  // return testDict;
  return axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/chargeDifferentiationList`);
};
// 品牌
export const getPingPaiSelect = () => {
  return testDict;
  // return axios.get(`/api/basedata/vehicleProduct/brandsqueryall`);
};
